#include <stdio.h>
struct complx
{
    int real, im;
};
struct complx cmult (struct complx za, struct complx zb)
{
    struct complx w;
    w.real = za.real * zb.real - za.im * zb.im;
    w.im = za.real * zb.im + za.im * zb.real;
    return ( w );
}
int main ()
{
    struct complx za = { 3, 4 };
    struct complx zb = { 5, 6 };
    struct complx xc={10,20};
	struct complx xd={30,40};
    struct complx z;
    struct complx x;
    z = cmult(za, zb);
    printf("(%d+%di)*(%d+%di)=", za.real, za.im, zb.real, zb.im);
    printf("(%d+%di)\n", z.real, z.im);
    x = cmult(xc, xd);
    printf("(%d+%di)*(%d+%di)=", xc.real, xc.im, xd.real, xd.im);
    printf("(%d+%di)\n", x.real, x.im);
    
    return 0;
}
